package com.atguigu.lease.common.context;

public class LoginUserContext {
    private static final ThreadLocal<LoginUser> tl = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser){
        tl.set(loginUser);
    }


    public static LoginUser getLoginUser() {
        return tl.get();
    }

    public static void clear(){
        tl.remove();
    }
}
